<template>
  <div class="refine_zfdddaytask">
    <div class="contant">
      <div class="plan-operate">
        <el-badge is-dot class="fl" :hidden="true">
          <div class="create" @click="receivebtn" v-if='newmsg'>收任务</div>
        </el-badge>
        <div class="fl create" @click="snapbtn">临时任务上传</div>
        <div class="fl create" @click="tmpbtn">临时情况上报</div>
        <div @click="recieveTask" class="fl create" v-if="!newmsg">领取任务</div>
<!--        <div @click="recieveTask" class="fl create" v-if="!aadmin">领取任务</div>-->
        <div class="plansearch">
          <el-input prefix-icon="el-icon-search" placeholder="搜索任务" @clear="search1" v-model="search"
                    clearable class="plansearch">
            <span slot="append" @click="search1">搜索</span>
          </el-input>
        </div>
      </div>
      <el-tabs v-model="plantabs" type="card" @tab-click="handleClick">
        <el-tab-pane label="执行中任务列表" name="first">
          <el-table border stripe :data="tableData1" style="width: 100%">
            <el-table-column prop="d_id" label="序号" align="center" width="60">
              <template slot-scope="scope">
                <span v-if='scope.$index!=9'>{{(currentPage-1).toString()+parseInt(scope.$index+1)}}</span>
                <span v-else>{{currentPage+'0'}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="taskNo" label="任务编号" align="center">
            </el-table-column>
            <el-table-column prop="name" label="任务名称" align="center">
            </el-table-column>
            <el-table-column prop="taskTypeFlows" label="任务类型" align="center">
              <template slot-scope="scope">
                <span v-for="item in scope.row.taskTypeFlows">{{ttypes(item) ? ttypes(item) : ''}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="" label="履职标准" align="center">
              <template slot-scope="scope">
                <el-button size="mini" type="text" @click="dispose(scope.row)">处置要求</el-button>
                <el-button size="mini" type="text" @click="check(scope.row)">检查内容</el-button>
              </template>
            </el-table-column>
            <el-table-column prop="organiza" label="所属辖区" align="center">
              <template slot-scope="scope">
                <span v-if="scope.row.organiza">{{scope.row.organiza.name}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="operate" label="操作" align="center" width="140">
              <template slot-scope="scope">
                <el-button size="mini" type="text" @click="handleSubmit(scope.row)">提交</el-button>
              </template>
            </el-table-column>
          </el-table>
          <!-- <ttable style="width:100%" :thead="thead1" :tdata="tableData1" :page="currentPage" :operate="toptions" @te="manipulate"></ttable> -->
        </el-tab-pane>
        <el-tab-pane label="已完成任务列表" name="second">

          <el-table border stripe :data="tableData2" style="width: 100%">
            <el-table-column prop="d_id" label="序号" align="center" width="60">
              <template slot-scope="scope">
                <span v-if='scope.$index!=9'>{{(currentPage1-1).toString()+parseInt(scope.$index+1)}}</span>
                <span v-else>{{currentPage1+'0'}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="taskNo" label="任务编号" align="center">
            </el-table-column>
            <el-table-column prop="name" label="任务名称" align="center">
            </el-table-column>
            <el-table-column prop="taskTypeName" label="任务类型" align="center">
              <!--<template slot-scope="scope">
                <span v-for="item in scope.row.taskTypeFlows">{{ttypes(item) ? ttypes(item) : ''}}</span>
              </template>-->
            </el-table-column>
            <el-table-column prop="organiza.name" label="所属辖区" align="center">
            </el-table-column>
            <el-table-column prop="operate" label="操作" align="center" width="140">
              <template slot-scope="scope">
                <el-button size="mini" type="text" v-if="showBtn(scope.row, 'feedback') && !scope.row.finishTime" @click="caozuo({data: scope.row, action: 'feedbackSub'})">提交</el-button>
                <el-button size="mini" type="text" v-if="showBtn(scope.row, 'feedback') && scope.row.finishTime" @click="caozuo({data: scope.row, action: 'feedbackEdit'})">修改</el-button>
                <el-button size="mini" type="text" v-if="showBtn(scope.row, 'view')" @click="caozuo({data: scope.row, action: 'view'})">查看</el-button>
                <el-button size="mini" type="text" v-if="showBtn(scope.row, 'del')" @click="caozuo({data: scope.row, action: 'del'})">删除</el-button>
              </template>
            </el-table-column>
          </el-table>
          <!--<data-table style="width:100%" :head="thead2" :data="tableData2" :page="currentPage1" :operate="ooptions"
                      :actions="['feedback','view', 'del']"
                      @callback="caozuo"></data-table>-->
        </el-tab-pane>
      </el-tabs>
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
                     :current-page.sync="currentPage" v-if='plantabs=="first"'
                     layout="total,prev, pager, next, jumper" :total="pageNumber" background>
      </el-pagination>
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
                     :current-page.sync="currentPage1" v-if='plantabs=="second"'
                     layout="total,prev, pager, next, jumper" :total="pageNumber1" background>
      </el-pagination>
    </div>
    <el-dialog title="" :visible.sync="receiveTask" width="80%" append-to-body class="task-content">
      <h2 class="titleblue">收任务</h2>
      <div class="contant">
        <data-table style="width:100%" :head="thead3" :data="tableData3" :page="currentPage3" :operate="roptions"
                    :actions="['receive','reject','view']" @callback="rmanipulate"></data-table>
        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
                       :current-page.sync="currentPage3" layout="total,prev, pager, next, jumper"
                       :total="pageNumber3" background>
        </el-pagination>
      </div>
    </el-dialog>
    <!-- 收任务 -->
    <el-dialog title="" :visible.sync="taskReceive" @close='closetaskview' width="80%" append-to-body class="task-content">
      <h2 class="titleblue">任务详情</h2>
      <div class="contant" style="padding: 0px 50px 100px 30px;">
        <div class="tit-cont">
          <div class="tit-div">
            <div class="blue-div">
              <img src="@/assets/taskCreateBlue.png" v-if="detail.createTime"/>
              <img src="@/assets/taskCreateG.png" v-else>
            </div>
            <p>{{detail.createTime}}</p>
          </div>
          <div class="line-div">
            <p class="blue-line" v-if="detail.sendTime"></p>
            <p class="grey-line" v-else></p>
          </div>
          <div class="tit-div margin25">
            <div class="blue-div">
              <img src="@/assets/taskUnitB.png" v-if="detail.sendTime"/>
              <img src="@/assets/taskUnitG.png" v-else>
            </div>
            <p>{{detail.sendTime}}</p>
          </div>
          <div class="line-div">
            <p class="blue-line" v-if="detail.finishTime"></p>
            <p class="grey-line" v-else></p>
          </div>
          <div class="tit-div margin25">
            <div class="blue-div">
              <img src="@/assets/taskedB.png" v-if="detail.finishTime">
              <img src="@/assets/taskedG.png" v-else>
            </div>
            <p>{{detail.finishTime}}</p>
          </div>
        </div>
        <div class="task-detail">
          <ul>
            <li class="taskLabel">任务编号</li>
            <li class="taskInfo bgcolor-ccc">{{detail.taskNo}}</li>
            <li class="taskLabel">任务创建人</li>
            <li class="taskInfo noBorder bgcolor-ccc">{{detail.createUserName}}</li>
            <li class="taskLabel">任务名称</li>
            <li class="taskInfo">{{detail.name}}</li>
            <li class="taskLabel">任务提交人</li>
            <li class="taskInfo noBorder bgcolor-ccc">{{detail.commitName}}</li>
            <li class="taskLabel">任务类型</li>
            <li class="taskInfo">
              {{detail.taskTypeFlows}}
            </li>
            <li class="taskLabel">任务等级</li>
            <li class="taskInfo noBorder">{{detail.grade}}</li>
            <li class="taskLabel">任务对象</li>
            <li class="taskInfo">{{detail.taskObject}}</li>
            <li class="taskLabel">任务对象类型</li>
            <li class="taskInfo noBorder">
              {{detail.object1}}
              <span v-if="detail.object2">,</span>
              {{detail.object2}}
              <span v-if="detail.object3">,</span>
              {{detail.object3}}
            </li>
            <li class="taskLabel">值班人员</li>
            <li class="taskLong">{{detail.dutyFullname}}</li>
            <li class="taskLabel height68 line-height-68">任务概要</li>
            <li class="taskLong height68">{{detail.summary}}</li>
            <li class="taskLabel">专项</li>
            <li class="taskLong">
              <el-checkbox v-model="detail.special" disabled class="task-check">是</el-checkbox>
              <!-- <el-checkbox-group v-model="specialList" class="task-checkbox" v-show="detail.special">
                  <el-checkbox disabled v-for="item in specialArr" :label="item.d_id" :key="item.d_id">
                      {{item.name}}
                  </el-checkbox>
              </el-checkbox-group> -->
              <el-col :span="6" v-for="(item,index) in specialItem" :key='index' class="copyli">
                {{item}}
              </el-col>
            </li>
            <li class="taskLabel">任务地点</li>
            <li class="taskInfo">{{detail.location}}</li>
            <li class="taskLabel">任务期限</li>
            <li class="taskInfo noBorder">{{detail.deadline}}</li>
            <li class="taskLabel">任务派发</li>
            <li class="taskLong">
              <div class="taskInfo noBorder" style="border-bottom: none;">{{detail.organiza}}</div>
              <div class="width-400 noBorder">{{detail.enforcementbrigade_name}}</div>
            </li>
            <li class="task-dheight taskLabel" :style="{'line-height': `${dheight}px`, 'height': `${dheight}px`}">执行单元</li>
            <li class="task-border-bottom" ref='det'>
              <div v-for="(item,index) of unitlist" :key="index" class="task-height">
                <div class="task-width-200">&nbsp;{{item.fullname}}</div>
                <div class="task-width-200">&nbsp;{{item.carName}}</div>
                <div class="task-width-200">&nbsp;{{item.vehicle_name}}</div>
                <div class="task-width-200 noBorder">&nbsp;{{item.toolName}}</div>
              </div>
            </li>
            <li class="taskLabel height68 line-height-68">备注</li>
            <li class="taskLong height68">{{detail.remark}}</li>

          </ul>
        </div>
      </div>
    </el-dialog>

    <!-- 临时任务上传 -->
    <el-dialog title="" :visible.sync="snapTask" @close='closetaskup' width="80%" append-to-body class="task-content">
      <h2 class="titleblue">临时任务上传</h2>
      <div class="contant">
        <el-form ref="form" :disabled="formDisabled" :model="task" label-width="120px">
          <el-row>
            <el-col :span="12">
              <el-form-item label="任务名称" prop="name" :rules="[{ required: true, message: '任务名称不能为空'}]">
                <el-input v-model="task.name" placeholder="" class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="任务对象">
              <el-col :span="12">
                <div v-for="(item, index) in taskObject">
                  <el-input clearable v-model="item.taskObject" placeholder=""
                            style="width: calc(100% - 30px);margin-bottom: 10px;"></el-input>
                  <i class="el-icon-circle-close" @click="taskObject.splice(index,1)" style="font-size: 20px;"
                     v-if="index !=0 && !formDisabled"></i>
                </div>
              </el-col>
              <el-col :span="4">
                <el-button type="primary" class="blue-button" @click="addTaskObjectRow()" v-if='!formDisabled'>添加任务对象
                </el-button>
              </el-col>
            </el-form-item>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="任务类型" :rules="[{ required: true, message: '任务类型不能为空'}]">
                <el-row>
                  <el-col :span="20">
                    <div v-for="(element, index) in task.taskTypeFlows" class="unit-wrap clear">
                      <el-select v-model="element.type1" placeholder="" class="fl" style="margin-right: 10px;"
                                 :disabled="formDisabled"
                                 @change="typeChange($event, index)">
                        <el-option v-for="item in taskType" :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
                      </el-select>
                      <div class="fl" style="margin-right: 10px;">
                        <el-select v-model="element.type2" placeholder="" class="w98" :disabled="formDisabled"
                                   @change="typeChange2($event, index)">
                          <el-option v-for="item in element.taskType2" :key="item.id" :label="item.name"
                                     :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                      <div class="fl" style="margin-right: 10px;">
                        <el-select v-model="element.type3" placeholder="" class="w98" :disabled="formDisabled">
                          <el-option v-for="item in element.taskType3" :key="item.id" :label="item.name"
                                     :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                      <i class="el-icon-circle-close" @click="task.taskTypeFlows.splice(index,1)"
                         v-if="index !=0 && !formDisabled"></i>
                    </div>
                  </el-col>
                </el-row>
              </el-form-item>

            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="任务对象类型">
                <el-select v-model="task.object1" placeholder="" class="" style="margin-right: 6px;"
                           @change="objectChange">
                  <el-option v-for="item in taskObjectType" :key="item.id" :label="item.taskname" :value="item.id">
                  </el-option>
                </el-select>
                <el-select v-model="task.object2" clearable placeholder="" class="" style="margin-right: 6px;"
                           @change='changeObjectType'>
                  <el-option v-for="item in objectOptionSon" :key="item.id" :label="item.taskname" :value="item.id">
                  </el-option>
                </el-select>
                <el-select v-model="task.object3" clearable placeholder="" class="" style="margin-right: 6px;">
                  <el-option v-for="item in shipTypeThree" :key="item.id" :label="item.taskname" :value="item.id">
                  </el-option>
                </el-select>


                <el-input v-model="task.objectName" v-if="objectInputShow" placeholder=""
                          class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="任务概要" :rules="[{ required: true, message: '任务概要不能为空'}]">
                <el-input type="textarea" v-model="task.summary" placeholder="" class="_area"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="10">
              <el-form-item label="任务等级" :rules="[{ required: true, message: '任务等级不能为空'}]">
                <el-select v-model="task.grade" placeholder="" class="select-width-220">
                  <el-option v-for="item in gradeOptions" :key="item.d_id" :label="item.name" :value="item.d_id">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="任务地点">
                <el-input v-model="task.location" placeholder="" class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="20">
              <el-form-item label="执行单元">
                <div v-for="(item, index) in task.unit" class="unit-wrap clear">
                  <el-select v-model="item.person" placeholder="执法人员推荐" class="w33">
                    <el-option v-for="item in personOptions" :key="item.id" :label="item.fullname" :value="item.id">
                    </el-option>
                  </el-select>
                  <el-select v-model="item.carrier" placeholder="执法船艇推荐" class="w33">
                    <el-option v-for="item in carrierOptions" :key="item.d_id" :label="item.name" :value="item.d_id">
                    </el-option>
                  </el-select>
                  <el-select v-model="item.vehicle" placeholder="执法车辆推荐" class="w33">
                    <el-option v-for="item in vehicleOptions" :key="item.d_id" :label="item.name" :value="item.d_id">
                    </el-option>
                  </el-select>
                  <el-select v-model="item.tool" placeholder="执法工具推荐" class="w33">
                    <el-option v-for="item in toolOptions" :key="item.d_id" :label="item.name" :value="item.d_id">
                    </el-option>
                  </el-select>
                  <i class="el-icon-circle-close" @click="task.unit.splice(index,1)" v-if="index !=0"></i>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-button type="primary" class="blue-button" @click="addUnitRow">添加执行单元</el-button>
            </el-col>
          </el-row>

          <el-row :span="20">
            <el-col :span="20">
              <el-form-item label="缺陷项">
                <div v-for="(item,index) in childlist" class="unit-wrap clear">
                  <el-input v-model="item.defectitem" placeholder="" class="select-width-220"></el-input>
                  <el-col :span="8" style="margin-left:15px;">
                    <label>滞留缺陷</label>
                    <el-radio-group v-model="item.retention">
                      <el-radio :label="1">是</el-radio>
                      <el-radio :label="0">否</el-radio>
                    </el-radio-group>
                  </el-col>
                  <i class="el-icon-circle-close" @click="childlist.splice(index,1)" v-if="index !=0"></i>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-button type="primary" class="blue-button" @click="addRow">添加缺陷项</el-button>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="缺陷数量">
                <el-input v-model="task.defectCount" placeholder="" class="_area"></el-input>
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="滞留缺陷数量">
                <el-input v-model="task.retentionCount" placeholder="" class="_area"></el-input>
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="已整改缺陷数量">
                <el-input v-model="task.rectifyCount" placeholder="" class="_area"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="执行情况">
                <el-input type="textarea" v-model="task.implementation" placeholder="" class="_area"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row class="punish-div">
            <el-col>
              <el-form-item label="处理措施">
                <!--                <el-col :span='6'>-->
                <!--                  <el-checkbox v-model='punishment.check1' label="立案调查">立案调查</el-checkbox>-->
                <!--                </el-col>-->
                <!--                <el-col :span='6'>-->
                <!--                  <el-checkbox v-model='punishment.check2' label="行政处罚">行政处罚</el-checkbox>-->
                <!--                  <el-select v-model='punishment.select1' style="width:120px;margin:0px 10px" class="select-width-100"-->
                <!--                             v-if='punishment.check2' :disabled='readread'>-->
                <!--                    <el-option v-for="it in XZCF" :key="it.id" :label="it.name" :value="it.id">-->
                <!--                    </el-option>-->
                <!--                  </el-select>-->
                <!--                </el-col>-->
                <!--                <el-col :span='6'>-->
                <!--                  <el-checkbox v-model='punishment.check3' label="滞留">滞留</el-checkbox>-->
                <!--                </el-col>-->
                <!--                <el-col :span='6'>-->
                <!--                  <el-checkbox v-model='punishment.check4' label="违法记分">违法记分</el-checkbox>-->
                <!--                  <el-select v-model='punishment.select2' style="width:120px;margin:0px 10px" class="select-width-100"-->
                <!--                             v-if='punishment.check4' :disabled='readread'>-->
                <!--                    <el-option v-for="it in options" :key="it" :label="it" :value="it">-->
                <!--                    </el-option>-->
                <!--                  </el-select>-->
                <!--                </el-col>-->
                <!--                <el-col :span='6'>-->
                <!--                  <el-checkbox v-model='punishment.check5' label="警示教育">警示教育</el-checkbox>-->
                <!--                </el-col>-->
                <el-col :span='24'>
                  <el-checkbox-group v-model="punishment.measureCheck">
                    <el-row>
                      <el-col :span='8'>
                        <el-checkbox label="立案调查"></el-checkbox>
                      </el-col>
                      <el-col :span='8'>
                        <el-checkbox label="行政处罚"></el-checkbox>
                      </el-col>
                      <el-col :span='8'>
                        <el-checkbox label="滞留"></el-checkbox>
                      </el-col>
                      <el-col :span='8'>
                        <el-checkbox label="违法记分"></el-checkbox>
                      </el-col>
                      <el-col :span='8'>
                        <el-checkbox label="警示教育"></el-checkbox>
                      </el-col>
                    </el-row>
                  </el-checkbox-group>
                </el-col>
                <el-col :span='24'>
                  <el-input type="textarea" :rows="4" v-model="punishment.textarea" placeholder=""></el-input>
                </el-col>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="任务附件">
              <el-upload class="upload-demo" ref="upload" :action="$config.FILE_UPLOAD_URL" :data='uploadobj'
                         :limit="9" accept='.png,.jpg,.jpeg,.docx,.pdf,.xlsx,.xls,.txt,.mp4' :headers="headers"
                         multiple :before-upload='beforeupload' :on-success='uploadSuccess' :on-remove="uploadRemove"
                         :on-exceed="handleExceed" :file-list="fileList">
                <el-button size="small" type="primary">上传</el-button>
                <div slot="tip" class="el-upload__tip">任务附件</div>
              </el-upload>
            </el-form-item>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="备注">
                <el-input type="textarea" v-model="task.remark" placeholder="" class="_area"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <div class="button-action" style="text-align: center;" v-if='!formDisabled'>
            <el-button class="sure" @click="submit">提交</el-button>
            <el-button class="cancel" @click='closetaskup'>取消</el-button>
          </div>
        </el-form>
      </div>
    </el-dialog>

    <!-- 临时情况上报 -->
    <el-dialog title="" :visible.sync="tmpSituation" width="80%" append-to-body class="task-content" @close="temporaryClose">
      <h2 class="titleblue">临时情况上报</h2>
      <div class="contant">
        <el-form ref="form" :model="form" label-width="100px">
          <el-row>
            <el-col :span="24">
              <el-form-item label="上报单位" :rules="[{ required: true, message: '上报单位不能为空'}]">
                <el-select v-model="form.distribute" placeholder="" @change="dpChanges" :disabled="tmp"
                           style="margin-right: 6px;">
                  <el-option v-for="item in organization" :key="item.id" :label="item.name" :value="item.id">
                  </el-option>
                </el-select>
                <el-select v-model="form.enforcementBrigade" placeholder="" :disabled="tmp">
                  <el-option v-for="item in deptOption" :key="item.id" :label="item.name" :value="item.id">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>

          </el-row>
          <el-row>
            <el-col :span="10">
              <el-form-item label="任务等级" :rules="[{ required: true, message: '任务等级不能为空'}]">
                <el-select v-model="form.grade" placeholder="">
                  <el-option v-for="item in gradeOptions" :key="item.d_id" :label="item.name" :value="item.d_id">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="任务地点">
                <el-input v-model="form.location" placeholder="" :disabled="tmp" class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="任务概要" :rules="[{ required: true, message: '任务概要不能为空'}]">
                <el-input type="textarea" v-model="form.summary" :disabled="tmp" placeholder=""></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="其他情况">
                <el-input type="textarea" v-model="form.otherCases" :disabled="tmp" placeholder=""></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="任务附件">
              <el-upload class="upload-demo" ref="upload" :action="$config.FILE_UPLOAD_URL" :data='uploadobj'
                         :limit="9" accept='.png,.jpg,.jpeg,.docx,.pdf,.xlsx,.xls,.txt,.mp4' :headers="headers"
                         multiple :before-upload='beforeupload' :on-success='uploadSuccess' :on-remove="uploadRemove"
                         :on-exceed="handleExceed" :file-list="fileList">
                <el-button size="small" type="primary">上传</el-button>
                <div slot="tip" class="el-upload__tip">任务附件</div>
              </el-upload>
            </el-form-item>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="备注">
                <el-input type="textarea" v-model="form.remark" placeholder=""></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <div class="button-action" style="text-align: center;" v-if='!formDisabled'>
            <el-button class="sure" @click="submitTing">提交</el-button>
            <el-button class="cancel" @click='temporaryClose'>取消</el-button>
          </div>
        </el-form>
      </div>
    </el-dialog>

    <router-view @close="close" @update="search1" :sysUser="sysUser" :taskType="taskType"
                 :organization="organization" :taskObjectType="taskObjectType"></router-view>

    <!--提交任务 -->
    <el-dialog title="" :visible.sync="taskupload" @close='closetaskup' width="80%" append-to-body class="task-content">
      <h2 class="titleblue">{{taskTit}}</h2>
      <div class="contant" style="padding: 0px 100px 100px 30px;">
        <div class="tit-cont">
          <div class="tit-div">
            <div class="blue-div">
              <img src="@/assets/taskCreateBlue.png" v-if="detail.createTime"/>
              <img src="@/assets/taskCreateG.png" v-else>
            </div>
            <p>{{detail.createTime}}</p>
          </div>
          <div class="line-div">
            <p class="blue-line" v-if="detail.sendTime"></p>
            <p class="grey-line" v-else></p>
          </div>
          <div class="tit-div margin25">
            <div class="blue-div">
              <img src="@/assets/taskUnitB.png" v-if="detail.sendTime"/>
              <img src="@/assets/taskUnitG.png" v-else>
            </div>
            <p>{{detail.sendTime}}</p>
          </div>
          <div class="line-div">
            <p class="blue-line" v-if="detail.finishTime"></p>
            <p class="grey-line" v-else></p>
          </div>
          <div class="tit-div margin25">
            <div class="blue-div">
              <img src="@/assets/taskedB.png" v-if="detail.finishTime">
              <img src="@/assets/taskedG.png" v-else>
            </div>
            <p>{{detail.finishTime}}</p>
          </div>
        </div>
        <el-form ref="form" :model="taskForm" label-width="120px">
          <el-row>
            <el-col :span="10">
              <el-form-item label="任务编号">
                <el-input v-model="detail.taskNo" placeholder="自动生成" disabled class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="14">
              <el-form-item label="任务名称" prop="name">
                <el-input v-model="detail.name" readonly placeholder="" class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="任务类型">
                <el-row>
                  <div v-for="element in detail.taskTypeFlows" class="unit-wrap clear">
                    <el-select v-model="element.type1" placeholder="" class="w98"
                               disabled>
                      <el-option v-for="item in taskType" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                    </el-select>
                    <el-select v-model="element.type2" placeholder="" class="w98" disabled>
                      <el-option v-for="item in element.taskType2" :key="item.id" :label="item.name"
                                 :value="item.id">
                      </el-option>
                    </el-select>
                    <el-select v-model="element.type3" placeholder="" class="w98">
                      <el-option v-for="item in element.taskType3" :key="item.id" :label="item.name"
                                 :value="item.id">
                      </el-option>
                    </el-select>
                  </div>
                </el-row>
              </el-form-item>

            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="任务对象">
              <el-col :span="12">
                <div v-for="(item, index) in taskObject2">
                  <el-input clearable v-model="item.taskObject" readonly placeholder=""
                            style="width: calc(100% - 30px);margin-bottom: 10px;"></el-input>
                  <!--<i class="el-icon-circle-close" @click="taskObject2.splice(index,1)" style="font-size: 20px;"-->
                  <!--v-if="index !=0 && !formDisabled"></i>-->
                </div>
              </el-col>
            </el-form-item>
          </el-row>
          <el-row>
            <el-col :span="14">
              <el-form-item label="任务对象类型">
                <el-input v-model="detail.object1" readonly class="select-width-100"></el-input>
                <el-input v-if="detail.object2" v-model="detail.object2" readonly
                          class="select-width-100"></el-input>
                <el-input v-if="detail.object3" v-model="detail.object3" readonly
                          class="select-width-100"></el-input>
                <!-- <el-input v-model="task.objectOther" v-if="objectInputShow" placeholder="" class="select-width-220"></el-input> -->
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="值班人员">
                <el-input type="text" v-model="detail.dutyFullname" readonly placeholder="" style="width: 300px"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="任务概要">
                <el-input type="textarea" v-model="detail.summary" readonly placeholder=""></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="任务创建人">
                <el-input v-model="detail.fullname" class="select-width-220 bgcolor-ccc" readonly></el-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="16" v-if="taskRow">
              <el-form-item label="任务派发">
                <el-input v-model="detail.organiza" readonly class="select-width-220"></el-input>
                <el-input v-if='detail.enforcementbrigade_name' v-model="detail.enforcementbrigade_name" readonly
                          class="select-width-220"></el-input>
              </el-form-item>

            </el-col>

          </el-row>
          <el-row v-if="detail.unitList!=''">
            <el-col :span="20">
              <el-form-item label="执行单元">
                <!--<div v-for="(item, index) in detail.unitList" class="unit-wrap clear">
                  <el-input v-model="item.fullname" readonly class="w33"></el-input>
                  <el-input v-model="item.carName" readonly class="w33"></el-input>
                  <el-input v-model="item.vehicle_name" readonly class="w33"></el-input>
                  <el-input v-model="item.toolName" readonly class="w33"></el-input>
                </div>-->
                <el-select v-model="sendUser.organiza" :clearable="!readread" :disabled='readread' style='padding-bottom: 20px;' class="select-width-220"
                           placeholder="" @change="manageChange($event)">
                  <el-option v-for="item in organization" :key="item.id" :readonly='readread' :label="item.name" :value="item.id">
                  </el-option>
                </el-select>
                <el-select class="select-width-220" :clearable="!readread"  v-model="sendUser.organiza2" :disabled='readread'
                           placeholder="" @change="disChange($event)">
                  <el-option v-for="item in sendUser.organizas" :key="item.id" :label="item.name" :value="item.id">
                  </el-option>
                </el-select>
                <div v-for="(item1, index1) in sendUser.enforceLaw" class="unit-wrap clear">
                  <el-select v-model="item1.person" :disabled='readread' :clearable="!readread" placeholder="执法人员推荐" class="w33">
                    <el-option v-for="item2 in item1.lawPeople" :key="item2.id" :label="item2.fullname" :value="item2.id">
                    </el-option>
                  </el-select>
                  <el-select v-model="item1.carrier" :disabled='readread' :clearable="!readread" placeholder="执法船艇推荐" class="w33">
                    <el-option v-for="item3 in item1.lawShip" :key="item3.id" :label="item3.fullname" :value="item3.id">
                    </el-option>
                  </el-select>
                  <el-select v-model="item1.vehicle" :disabled='readread' :clearable="!readread" placeholder="执法车辆推荐" class="w33">
                    <el-option v-for="item5 in item1.lawCar" :key="item5.id" :label="item5.fullname" :value="item5.id">
                    </el-option>
                  </el-select>
                  <el-select v-model="item1.tool" :disabled='readread' :clearable="!readread" placeholder="执法工具推荐" class="w33">
                    <el-option v-for="item4 in item1.lawTool" :key="item4.id" :label="item4.fullname" :value="item4.id">
                    </el-option>
                  </el-select>
                  <i class="el-icon-circle-close" @click="sendUser.enforceLaw.splice(index1,1)" v-if="index1 !=0 "></i>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="4" v-if='!readread'>
              <el-button type="primary" class="blue-button" @click="addUnitRow">添加执行单元</el-button>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="10">
              <el-form-item label="任务等级">
                <el-input v-model="detail.grade" readonly class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="任务地点">
                <el-input v-model="detail.location" readonly class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="taskRow">
            <el-col :span="10">
              <el-form-item label="任务时限">
                <el-input v-model="detail.deadline" readonly class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row v-if="taskRow">
            <el-col :span="16">
              <el-form-item label="专项">
                <el-col :span="4">
                  <el-checkbox v-model="detail.special">是</el-checkbox>
                </el-col>
                <el-col :span="20" class="special-cont">
                  <el-checkbox-group v-model="specialList" v-show="detail.special">
                    <el-checkbox v-for="item in specialArr" :label="item.id" :key="item.id">
                      {{item.name}}
                    </el-checkbox>
                  </el-checkbox-group>
                </el-col>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="taskRow||readread">
            <el-col :span="10">
              <el-form-item label="完成时间">
                <el-input v-model="detail.endTime" readonly class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="rTask">
            <el-col :span="20">
              <el-form-item label="缺陷项">
                <div v-for="(item,index) in childlist1" class="unit-wrap clear">
                  <el-input style="margin:0px" v-model="item.defectitem" :readonly='readread' placeholder=""
                            class="select-width-220"></el-input>
                  <el-col :span="8" style="margin-left:15px;">
                    <label>滞留缺陷</label>
                    <el-radio-group v-model="item.retention" :disabled='readread'>
                      <el-radio :label='1'>是</el-radio>
                      <el-radio :label='0'>否</el-radio>
                    </el-radio-group>
                  </el-col>
                  <i class="el-icon-circle-close" @click="childlist1.splice(index,1)" v-if="index!=0&&!readread"></i>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="4" v-if='!readread'>
              <el-button type="primary" class="blue-button" @click="addtaskRow">添加缺陷项</el-button>
            </el-col>
          </el-row>
          <el-row v-if="rTask">
            <el-col :span="10">
              <el-form-item label="检查数量">
                <el-input :readonly='readread' v-model="taskForm.shipCount" placeholder=""
                          class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="巡航里程(海里)">
                <el-input :readonly='readread' v-model="taskForm.cruise" placeholder=""
                          class="select-width-220"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="rTask">
            <el-col :span="6">
              <el-form-item label="缺陷数量">
                <el-input :readonly='readread' v-model="taskForm.defectCount" placeholder=""></el-input>
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="滞留缺陷数量">
                <el-input :readonly='readread' v-model="taskForm.retentionCount" placeholder=""></el-input>
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="已整改缺陷数量">
                <el-input :readonly='readread' v-model="taskForm.rectifyCount" placeholder=""></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="rTask">
            <el-col>
              <el-form-item label="执行情况">
                <el-input type="textarea" :readonly='readread' v-model="taskForm.implementation" placeholder=""></el-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row v-if="rTask" class="punish-div">
            <el-form-item label="处理措施">
              <el-col :span='24'>
                <el-checkbox-group v-model="taskForm.finalResult.measureCheck">
                  <el-row>
                    <el-col :span='8'>
                      <el-checkbox label="立案调查"></el-checkbox>
                    </el-col>
                    <el-col :span='8'>
                      <el-checkbox label="行政处罚"></el-checkbox>
                    </el-col>
                    <el-col :span='8'>
                      <el-checkbox label="滞留"></el-checkbox>
                    </el-col>
                    <el-col :span='8'>
                      <el-checkbox label="违法记分"></el-checkbox>
                    </el-col>
                    <el-col :span='8'>
                      <el-checkbox label="警示教育"></el-checkbox>
                    </el-col>
                  </el-row>
                </el-checkbox-group>
              </el-col>
              <el-col :span='24' style="margin-top:10px;">
                <el-input type="textarea" :readonly='readread' :rows="4" v-model="taskForm.finalResult.textarea"
                          placeholder=""></el-input>
              </el-col>
            </el-form-item>
          </el-row>
          <el-row v-if="readread">
            <el-form-item label='任务附件'>
              <div class="annex-width">
                <a class="annex-div file-div" v-for='(item,index) in fileImg' :key="index" target='_blank'
                   :href="item.url" download="item">
                  <div>{{item.name}}</div>
                </a>
              </div>
            </el-form-item>
          </el-row>
          <el-row v-else>
            <el-form-item label="任务附件" v-if="rTask&&taskupload">
              <el-upload class="upload-demo" ref="upload" :action="$config.FILE_UPLOAD_URL" :data='uploadobj'
                         :limit="9" accept='.png,.jpg,.jpeg,.docx,.pdf,.xlsx,.xls,.txt,.mp4' :headers="headers"
                         multiple :before-upload='beforeupload' :on-success='uploadSuccess' :on-remove="uploadRemove"
                         :on-exceed="handleExceed" :file-list="fileList">
                <el-button size="small" type="primary">上传</el-button>
                <div slot="tip" class="el-upload__tip">任务附件</div>
              </el-upload>
            </el-form-item>
          </el-row>
          <el-row v-if="rTask">
            <el-col>
              <el-form-item label="备注">
                <el-input type="textarea" v-model="taskForm.remark" placeholder=""></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <div class="button-action" style="text-align: center;" v-if='!readread'>
            <el-button class="cancel" @click="tasksubmit('save')" v-if="plantabs=='first'">保存</el-button>
            <el-button class="sure" @click="tasksubmit">提交</el-button>
            <!--<el-button class="sure" @click="tasksubmit" v-if="plantabs=='second'">反馈</el-button>-->
            <el-button class="cancel" @click='closetaskup'>取消</el-button>
          </div>
          <div class="button-action" style="text-align: center;" v-else>
            <el-button @click="lastLog" class="sure">上一篇</el-button>
            <el-button @click="nextLog" class="cancel">下一篇</el-button>
          </div>
        </el-form>

      </div>

    </el-dialog>

    <el-dialog title="" :visible.sync="checkShow" width="50%" append-to-body class="checkContent">
      <h2 class="titleblue">检查内容</h2>
      <div class="contant">
        {{checkContent}}
      </div>

    </el-dialog>
    <el-dialog title="" :visible.sync="disposeShow" width="50%" append-to-body class="checkContent">
      <h2 class="titleblue">处置要求</h2>
      <div class="contant">
        {{desposeContent}}
      </div>
    </el-dialog>
  </div>
</template>

<script>
  import DataTable from '@/components/common/DataTable.vue'
  import everydayTaskService from '@/services/EverydayTaskService'
  import taskObjectService from '@/services/TaskObjectService'
  import taskTypeService from '@/services/TaskTypeService'
  import taskService from '@/services/TaskService.js'
  import dictService from '@/services/DictionaryService.js'
  import plansService from '@/services/PlansService.js'
  import * as organizationService from '@/services/OrganizationService'
  import * as sysUserService from '@/services/SysUserService'

  export default {
    components: {
      'data-table': DataTable
    },
    data: function () {
      return {
        checkList: [],
        taskObject: [
          {taskObject: ''}
        ],
        taskObject2: [
          {taskObject: ''}
        ],
        plans: [],
        detail: {
          createTime: '',
          sendTime: '',
          createUserName: '',
          taskObject: '',
          summary: '',
          taskNo: '',
          name: '',
          taskTypeFlows: [{type1: '', type2: '', type3: '', taskType2: [], taskType3: []}],
          type1: '',
          type2: '',
          type3: '',
          manageUnit: '',
          object1: '',
          object2: '',
          object3: '',
          outline: '',
          special: false,
          distribute: '',
          distributeSecond: '',
          grade: '',
          location: '',
          deadline: '',
          unit: [{
            person: '',
            carrier: '',
            vehicle: '',
            tool: ''
          }],
          typeradio: false,
          typeName: '',
          // url_file: [],
          fullname: '',
          url: [],
          unitList: [{fullname: '', carName: '', toolName: '', vehicle_name: ''}],
          pf_date: '',
          task_date: '',
          endTime: '',
          taskType: [{type1: '', type2: '', type3: ''}],
          urlFile: [],
          finishTime: '',
        },//任务详情
        search: '',
        thead2: [
          {
            name: '任务编号',
            prop: 'taskNo'
          },
          {
            name: '任务名称',
            prop: 'name'
          },
          {
            name: '任务类型',
            prop: 'taskTypeName'
          },
          {
            name: '所属辖区',
            prop: 'organiza.name',

          }
        ],
        thead3: [
          {
            name: '任务编号',
            prop: 'taskNo'
          },
          {
            name: '任务名称',
            prop: 'name'
          },
          {
            name: '任务类型',
            prop: 'taskTypeName'
          },
          {
            name: '所属辖区',
            prop: 'organiza.name',

          }
        ],
        dheight: 34,
        specialItem: [],
        tableData1: [],
        tableData2: [],
        tableData3: [],
        // objectOptionSon: [],
        //已完成
        XZCF: [],
        punishment: {
            measureCheck: [],
            textarea: ''
        },
        // punishment: [
        //   {name: '立案调查', check: false},
        //   {name: '行政处罚', check: false, select: true},
        //   {name: '滞留', check: false},
        //   {name: '违法记分', check: false, select: true},
        //   {name: '警示教育', check: false}
        // ],
        fileList: [],
        ooptions: [
          {
            name: '反馈',
            prop: 'submit'
          },
          {
            name: '查看',
            prop: 'look'
          },
          {
            name: '删除',
            prop: 'del'
          }],
        //执行中列表
        toptions: [
          {
            name: '提交',
            prop: 'submit'
          }],
        roptions: [
          {
            name: '查看',
            prop: 'look'
          }, {
            name: '立即接收',
            prop: 'receive'
          }, {
            name: '暂不接收',
            prop: 'reject'
          },
          {
            name: '删除',
            prop: 'del'
          }],
        currentPage: 1,
        currentPage1: 1,
        currentPage3: 1,
        plantabs: 'first',
        receiveTask: false,
        snapTask: false,
        taskupload: false,
        tmpSituation: false,
        type: 'add',
        readread: false,
        newmsg: false,
        id: '',
        childlist: [{defectitem: '', retention: ''}],
        childlist1: [{defectitem: '', retention: ''}],
        specialList: [],
        treatmentmeas: [],
        treatmentmeas1: [],
        measure: ['行政处罚', '滞留'],
        approval: '0',
        // objectInputShow: false,
        typeFirstOptions: [],
        typeSecondOptions: [],
        manageUnitOptions: [],
        distributeOptions: [],
        disSecondOptions: [],
        gradeOptions: [
          {
            d_id: 1,
            name: '一般'
          }, {
            d_id: 2,
            name: '紧急'
          }
        ],
        personOptions: [],
        carrierOptions: [],
        vehicleOptions: [],
        toolOptions: [],
        personOptions1: [],
        carrierOptions1: [],
        vehicleOptions1: [],
        toolOptions1: [],
        specialArr: [],
        deptOptions: [],
        copylist: [],
        // shipTypeThree: [],
        level: 0,
        lhpf: [],
        rTask: true,
        checkShow: false,
        disposeShow: false,
        checkContent: '',
        desposeContent: '',
        checkId: '',
        taskTit: '任务上传',
        taskUrl: [],
        readOnly: false,
        num: 0,
        historyCount: 0,
        pickerOptions1: {
          disabledDate(time) {
            return time.getTime() + 3600 * 1000 * 24 < Date.now()
          },
        },
        uploadobj: {
          filename: '',
          mimeType: 'txt/doc',
          bus: 'task'
        },
        headers: {
          Authorization: 'Bearer ' + localStorage.getItem('token')
        },
        form: {
          distribute: '',
          enforcementBrigade: '',
          grade: '',
          location: '',
          summary: '',
          otherCases: '',
          remark: '',
          url: []
        },
        formDisabled: false,
        aadmin: true,
        pageNumber: 0,
        pageNumber1: 0,
        onekeydialog: false,
        taskid: '',
        defectitem: [
          {
            cont: ''
          }
        ],
        unitlist: [{fullname: '', carName: '', toolName: '', vehicle_name: ''}],
        taskForm: {
          cruise: '',
          shipCount: '',
          defectCount: '',
          retentionCount: '',
          rectifyCount: '',
          implementation: '',
          remark: '',
          othercases: '',
          remarks: '',
          url: [],
          type: '',
          finalResult: {
            measureCheck: [],
            textarea: ''
          }
        },
        groupOption: [],
        pageNumber3: 0,
        tmp: false,
        bgImg: [],
        fileImg: [],
        active: -1,
        taskRow: false,
        unitPeople: [{
          'person': '',
          'carrier': '',
          'vehicle': '',
          'tool': ''
        }],
        wfjf: false,
        // xzcf: false,
        options: ['1分', '2分', '3分', '4分', '5分', '6分', '7分', '8分', '9分', '10分', '11分', '12分'],
        value: '',
        value1: '',
        organizaAll: [],
        organization: [],
        organization2: [],
        deptOption: [],
        taskObjectType: [],
        shipTypeThree: [],
        objectOptions: [],
        objectOptionSon: [],
        objectInputShow: false,
        task: {
          defectCount: '',
          rectifyCount: '',
          retentionCount: '',
          othercases: '',
          taskObject: '',
          summary: '',
          name: '',
          object1: '',
          object2: '',
          object3: '',
          grade: '',
          location: '',
          unit: [{
            person: '',
            carrier: '',
            vehicle: '',
            tool: ''
          }],
          fullname: '',
          url: [],
          taskType: [{type1: '', type2: '', type3: ''}],
          taskTypeFlows: [{type1: '', type2: '', type3: '', taskType2: [], taskType3: []}],
          urlFile: [],
          remark: ''
        },//任务详情
        taskType: [],
        typeThirdOptions: [],
        sysUser: [],
        taskReceive: false,
        taskType2: [],
        taskType3: [],
        order: 1,
        submitJson: {},
        sendUser: {
          organiza: '',
          organiza2: '',
          organizas: [],
          enforceLaw: [{
            person: '',
            carrier: '',
            vehicle: '',
            tool: '',
            lawPeople: [],
            lawShip: [],
            lawCar: [],
            lawTool: [],
          }]
        }
      }
    },
    created() {
      this.$profile.userRoles.forEach(item => {
        if (item.name.indexOf('执法人员') != -1) {
          this.newmsg = true
        }
      })
      this.level = localStorage.getItem('ulevel')
      this.aadmin = this.$checkPermission('/everyday-task')
      this.getData(0)
      organizationService.findAll().then(async res => {
        await res.data.sort((a, b) => {
          if (a.businessOrg < b.businessOrg) {
            return -1
          }
          if (a.businessOrg > b.businessOrg) {
            return 1
          }
          return 0
        })
        this.organization = res.data
        this.organizaAll = res.dataAll
      })
      taskObjectService.search().then(res => {
        this.taskObjectType = res
      })
      taskTypeService.search().then(res => {
        this.taskType = res
      })
      dictService.find('XZCF').then(res => {
        this.XZCF = res
      })
      plansService.searchAll().then(res => {
        this.plans = res
      })
      sysUserService.findAll().then(async res => {
        this.sysUser = await res.data
        this.getPeople()
        // this.getSendTree()
      })
    },
    mounted() {
    },
    methods: {
        //  关闭临时情况上报
        temporaryClose() {
            this.tmpSituation = false
            this.form = {
                distribute: '',
                enforcementBrigade: '',
                grade: '',
                location: '',
                summary: '',
                otherCases: '',
                remark: '',
                url: []
            }
            this.fileList = []
        },
      //  关闭领取任务详情页面函数
        closetaskview(){
            this.taskReceive = false
            this.$set(this, 'unitlist', [{fullname: '', carName: '', toolName: '', vehicle_name: ''}])
            this.$set(this, 'dheight', 34)
            this.detail = {
                createTime: '',
                sendTime: '',
                createUserName: '',
                taskObject: '',
                summary: '',
                taskNo: '',
                name: '',
                taskTypeFlows: [{type1: '', type2: '', type3: '', taskType2: [], taskType3: []}],
                type1: '',
                type2: '',
                type3: '',
                manageUnit: '',
                object1: '',
                object2: '',
                object3: '',
                outline: '',
                special: false,
                distribute: '',
                distributeSecond: '',
                grade: '',
                location: '',
                deadline: '',
                unit: [{
                    person: '',
                    carrier: '',
                    vehicle: '',
                    tool: ''
                }],
                typeradio: false,
                typeName: '',
                // url_file: [],
                fullname: '',
                url: [],
                unitList: [{fullname: '', carName: '', toolName: '', vehicle_name: ''}],
                pf_date: '',
                task_date: '',
                endTime: '',
                taskType: [{type1: '', type2: '', type3: ''}],
                urlFile: [],
                finishTime: ''
            }
        },
      async addUnitRow() {
        let arr = []
        await this.sendUser.enforceLaw.forEach(item => {
          if (item.lawPeople) {
            arr = item.lawPeople
          }
        })
        this.sendUser.enforceLaw.push({
          person: '',
          carrier: '',
          vehicle: '',
          tool: '',
          lawPeople: arr,
          lawShip: [],
          lawCar: [],
          lawTool: []
        })
        // }
      },
      async disChange(val) {
        let arr = await this.sysUser.filter(item => {
          if (item.organiza && item.organiza.id) {
            return item.organiza.id == val
          }
        })
        await arr.sort((a, b) => {
            if (a.level < b.level) {
                return 1
            } else {
                return -1
            }
            return 0
        })
        await this.sendUser.enforceLaw.map(item => {
          item.person = ''
          item.lawPeople = arr
          return item
        })
      },
      async manageChange(val) {
        this.sendUser.organiza2 = ''
        this.sendUser.organizas = []
        await this.sendUser.enforceLaw.map(item => {
          item.person = ''
          item.lawPeople = []
          return item
        })
        let organiza = this.organization.find(item => {
          return item.id == val
        })
        let arr = this.sysUser.filter(item => {
          if (item.organiza && item.organiza.id) {
            return item.organiza.id == val
          }
        })
        await arr.sort((a, b) => {
            if (a.level < b.level) {
                return 1
            } else {
                return -1
            }
            return 0
        })
        await this.sendUser.enforceLaw.map(item => {
          item.person = ''
          item.lawPeople = arr
          return item
        })
        if (organiza.sub) {
          this.sendUser.organizas = organiza.sub
        }
      },
      showBtn (data, type) {
        var flags = null
        switch (type) {
          case 'feedback':
            if (data.feedbackFlag != null && data.feedbackFlag == true) {
              flags = false
            } else {
              flags = true
            }
            break;
          case 'view':
              flags = true
            break;
          case 'del':
              flags = false
            break;
        }
        return flags
      },
      addTaskObjectRow() {
        this.taskObject.push({taskObject: ''})
      },
      addTaskObjectRow2() {
        this.taskObject2.push({taskObject: ''})
      },
      ttypes(item) {
        let task = ''
        let obj1 = {}, obj2 = {}, obj3 = {}
        if (item.type1) {
          for (let tasks of this.taskType) {
            if (tasks.id == item.type1) obj1 = tasks
          }
          task = obj1.name ? obj1.name : ''
          if (obj1 && obj1.subset) {
            for (let tasks of obj1.subset) {
              if (tasks.id == item.type2) obj2 = tasks
            }
            if (item.type2) task = obj2 ? obj2.name : ''
            if (obj2 && obj2.subset && item.type2 && item.type3) {
              for (let tasks of obj2.subset) {
                if (tasks.id == item.type3) obj3 = tasks
              }
              if (obj3 && item.type3) {
                task = obj3.name ? obj3.name : ''
              }
            }
          }
        }
        return task
      },
      getPeople() {
        this.personOptions = this.sysUser.filter(item => {
          if (item.organiza) {
            return item.organiza.id == this.$profile.organiza.id
          }
        }).sort((a, b) => {
            if (a.level < b.level) {
                return 1
            } else {
                return -1
            }
            return 0
        })
      },
      objectChange() {
        this.task.object2 = ''
        this.task.object3 = ''
        this.objectOptionSon = []
        this.shipTypeThree = []
        // this.objectInputShow = false
        for (let key of this.taskObjectType) {
          if (key.id == this.task.object1 && key.subset) {
            // this.objectOptionSon = key.subset
            this.$set(this, 'objectOptionSon', key.subset)
          }
        }
      },
      changeObjectType(val) {
        this.shipTypeThree = []
        this.task.object3 = ''
        for (let i of this.objectOptionSon) {
          if (i.id == this.task.object2 && i.subset) {
            // this.shipTypeThree = i.subset
            this.$set(this, 'shipTypeThree', i.subset)
          }
        }
      },
      getData(num, query = '') {
        if (this.plantabs == 'first') {
          let str = 'taskState.in=10,3' + `${query ? '&' : ''}${query ? query : ''}` + '&' + 'taskUserId.equals=' + this.$profile.id + '&'
          if (this.$profile.organiza.businessOrg == 5) {
            str += 'centerTaskFlag.equals=true'
          } else if (this.$profile.organiza.businessOrg == 4) {
            str += 'enforcementBrigade.equals=' + this.$profile.organiza.id
          } else if (this.$profile.organiza.businessOrg == 3) {
            str += 'managementUnit.equals=' + this.$profile.organiza.id
          } else if (this.$profile.organiza.businessOrg == 2 || this.$profile.organiza.businessOrg == 1) {
            str += 'businessUnit.equals=' + this.$profile.organiza.id
          }
          taskService.criteriaQueries(num, str).then(res => {
            this.tableData1 = res.data
            // this.pageNumber = res.dataCount
            this.pageNumber = parseInt(res.headers['x-total-count'], 10)
          })
        } else if (this.plantabs == 'second') {
          let str = 'taskState.equals=8' + `${query ? '&' : ''}${query ? query : ''}` + '&' + 'taskUser.equals=' + this.$profile.id + '&'
          if (this.$profile.organiza.businessOrg == 5) {
            str += 'centerTaskFlag.equals=true'
          } else if (this.$profile.organiza.businessOrg == 4) {
            str += 'enforcementBrigade.equals=' + this.$profile.organiza.id
          } else if (this.$profile.organiza.businessOrg == 3) {
            str += 'managementUnit.equals=' + this.$profile.organiza.id
          } else if (this.$profile.organiza.businessOrg == 2 || this.$profile.organiza.businessOrg == 1) {
            str += 'businessUnit.equals=' + this.$profile.organiza.id
          }
          taskService.criteriaQueries(num, str).then(res => {
            res.data.map(async item => {
              item.taskTypeName = ''
              if (item.taskTypeFlows.length) {
                item.taskTypeFlows.forEach(async fe => {
                  item.taskTypeName += await this.ttypes(fe)
                })
              }
            })
            // let data = res.data.filter(item => {
            //   return item.feedbackFlag == true
            // })
            // this.tableData2 = data
            this.tableData2 = res.data
            // this.pageNumber1 = res.dataCount
            this.pageNumber1 = parseInt(res.headers['x-total-count'], 10)
          })
        }
      },
      onMouseOver(id) {
        this.active = id
      },
      onMouseOut() {
        this.active = -1
      },
      /*已完成列表*/
      caozuo(param) {
        if (param.action == 'feedbackSub' || param.action == 'feedbackEdit') {
          this.taskupload = true
          this.readread = false
          // this.taskid = item.d_id
          this.taskRow = false
          this.readOnly = true
          this.rTask = true
            if (param.action == 'feedbackSub') {
                this.taskTit = '任务提交'
            } else if (param.action == 'feedbackEdit') {
                this.taskTit = '任务修改'
            }
          this.showSend(param.data)
        } else if (param.action == 'view') {
          this.order = (this.currentPage3 - 1) * 10 + param.index
          this.taskupload = true
          this.readread = true
          // this.taskid = item.d_id
          this.punishment = []
          this.taskRow = false
          this.readOnly = false
          this.rTask = true
          this.taskTit = '查看任务'
          this.showSend(param.data)
        } else if (param.action == 'del') {

        }
      },
      // 显示领取任务界面
      // showReceive (data) {
      //   for (let key in data) {
      //     this.detail[key] = data[key]
      //     // if (key == 'id') {
      //     //
      //     // } else {
      //     //   this.detail[key] = data[key]
      //     // }
      //
      //   }
      // },
      async showReceive(data) {
        // if (this.pageType == 'search') {
        //   this.xiangqing = false
        // } else if (this.pageType == 'supervision') {
        //   this.xiangqing = true
        //   if(this.detailType == 'second'){
        //     this.inspected = true
        //   }
        // }
        for (let key in data) {

          if (key == 'id') {
            this.detailId = data[key]
          } else if (key == 'createTime' && data[key]) {
            this.createTime = data[key]
            this.detail.createTime = this.$m(data[key]).format('YYYY-MM-DD HH:mm:ss')
          } else if (key == 'finishTime' && data[key]) {
            this.detail.finishTime = this.$m(data[key]).format('YYYY-MM-DD HH:mm:ss')
          } else if (key == 'sendTime' && data[key]) {
            this.detail.sendTime = this.$m(data[key]).format('YYYY-MM-DD HH:mm:ss')
          } else if (key == 'taskUsers' && data[key]) {
            data.taskUsers.forEach((item, index) => {
              if (index > 0) {
                this.unitlist.push({fullname: '', carName: '', toolName: '', vehicle_name: ''})
                this.dheight += 35
              }
              let user = this.sysUser.find(fil => {
                return fil.id == item.userId
              })
              if (user && user.fullname) this.unitlist[index].fullname = user.fullname
            })
          } else if (key == 'taskTypeFlows' && data[key]) {
            let arr = await data[key].map(item => {
              return {type1: item.type1, type2: item.type2, type3: item.type3}
            })
            let task = []
            await arr.forEach((item, index) => {
              if (item.type1) {
                let obj1 = this.taskType.find(fin => {
                  return fin.id == item.type1
                })
                  task[index] = obj1 ? obj1.name : ''
                if (obj1 && obj1.subset) {
                  let obj2 = obj1.subset.find(fin => {
                    return fin.id == item.type2
                  })
                    task[index] = obj2 ? obj2.name : ''
                  if (obj2 && obj2.subset && item.type2) {
                    let obj3 = obj2.subset.find(fin => {
                      return fin.id == item.type3
                    })
                    if (obj3 && item.type3) {
                      task[index] = obj3.name
                    }
                  }
                }
              }
            })
            this.detail.taskTypeFlows = task.join(',')
          } else if (key == 'organiza' && data[key]) {
            this.detail.organiza = data[key].name
          } else if (key == 'grade' && data[key]) {
            this.detail.grade = data[key] == 1 ? '一般':'紧急'
          } else if (key == 'deadline' && data[key]) {
            this.detail.deadline = this.$m(data[key]).format('YYYY-MM-DD HH:mm:ss')
          } else if (key == 'urlFile' && data[key]) {
            this.fileImg1 = data[key].split(',')
          } else if ((key == 'object1' || key == 'object2' || key == 'object3') && data[key]) {
            let obj, obj2, obj3
            obj = this.taskObjectType.find(item => {
              return item.id == data.object1
            })
            this.detail.object1 = obj ? obj.taskname : ''
            if (obj && key == 'object2' && obj.subset) {
              obj2 = obj.subset.find(item => {
                return item.id == data.object2
              })
              this.detail.object2 = obj2 ? obj2.taskname : ''
              if (obj2 && key == 'object3' && obj2.subset) {
                obj3 = obj2.subset.find(item => {
                  return item.id == data.object3
                })
                this.detail.object3 = obj3 ? obj3.taskname : ''
              }
            }
          } else if (key == 'assignFullname' && data[key]) {
            this.detail.commitName = data[key]
          } else if (key == 'special' && data[key]) {
            if (data[key]) {
              this.detail.special = true
            } else {
              this.detail.special = false
            }
            let arr = data[key].split(',')
            arr.forEach(async item => {
              let obj = await this.plans.find(fin => {
                return fin.id == item
              })
              this.specialItem.push(obj.name)
            })

          } else if (key == 'finalResult' && data[key]) {
            let list = JSON.parse(data[key])
            if (list) {
              this.punishment = list
              this.taskForm[key] = list
            }
          } else if (key == 'questionFlag' && data[key]) {
            this.detail.questionFlag = data[key] ? 1 : 2
          } else if (key == 'superviseResult' && data[key]) {
            this.detail.inspectionOpinion = data[key]
          } else {
            this.detail[key] = data[key]
          }
        }
      },
      /*领取任务 */
      rmanipulate(param) {
        if (param.action == 'view') {
          this.taskReceive = true
          this.showReceive(param.data)
        } else if (param.action == 'receive') {
          this.$confirm('立即接收任务则不可退回', '提示', {
            confirmButtonText: '接收',
            cancelButtonText: '暂不',
          }).then(() => {
            taskService.update({id: param.data.id}, 5).then(res => {
              if (res) {
                this.getReceiveTask()
                this.search1()
                this.$message({
                  type: 'success',
                  message: '接收成功'
                })
              }
            })
          })
        } else if (param.action == 'reject') {
          this.$prompt('请输入暂不接收理由', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/,
            inputErrorMessage: '暂不接收理由不能为空',
          }).then(({value}) => {
            taskService.update({id: param.data.id, refusingAccept: value}, 6).then(res => {
              if (res) {
                this.getReceiveTask()
                this.search1()
                this.$message({
                  type: 'success',
                  message: '拒绝成功'
                })

              }
            })
          }).catch(() => {

          })

        } else if (param.action == 'edit') {
          this.taskReceive = true
          this.showReceive(param.data)
        }

      },
      handleClick(tab, event) {
        this.currentPage = 1
        this.currentPage1 = 1
        this.currentPage3 = 1
        this.getData(0)
      },
      handleSizeChange(val) {
        this.getData(val - 1)
      },
      handleCurrentChange(val) {
        this.currentPage = val
        this.currentPage1 = val
        this.currentPage3 = val
        this.getData(val - 1)
      },
      receivebtn() {
        this.receiveTask = true
        this.getReceiveTask()
      },
      getReceiveTask() {
        taskService.receive().then(res => {
          res.data.map(async item => {
            item.taskTypeName = ''
            if (item.taskTypeFlows.length) {
              item.taskTypeFlows.forEach(async fe => {
                item.taskTypeName += await this.ttypes(fe)
              })
            }
          })
          this.tableData3 = res.data
          this.pageNumber3 = parseInt(res.headers['x-total-count'], 10)
        })
      },
      snapbtn() {
        this.snapTask = true
        this.punishment.length = 0
      },
      dpChanges(val) {
        this.deptOptions = []
          let organiza = this.organization.find(item => {
              return item.id == val
          })
          if (organiza.sub) {
              this.deptOption = organiza.sub
          }
        // for (var i of this.groupOption) {
        //   if (i.id == val) {
        //
        //     if (i.son.length != 0) {
        //       this.qwer = true
        //       this.deptOptions = i.son
        //     } else {
        //       this.qwer = false
        //     }
        //   }
        // }

      },
      tmpbtn() {
        this.tmpSituation = true
      },
      recieveTask() {
        let data = this.taskType
        this.onekeydialog = true
        this.$router.push({name: 'TaskObtain', params: {data: data}})
      },
      // 临时任务上传
      async submit() {
        let isNull = '', taskTypeFlows = [], organiza = [], user = []
        if (this.task.name.length == 0) {
          this.$alert('请输入任务名称')
          return false
        }
        if (this.task.summary.length == 0) {
          this.$alert('请输入任务概要')
          return false
        }
        if (this.task.grade.length == 0) {
          this.$alert('请选择任务等级')
          return false
        }
        await this.task.taskTypeFlows.forEach(item => {
          if (!item.type1) {
            isNull++
          } else {
            taskTypeFlows.push({
              type1: item.type1 ? item.type1 : '',
              type2: item.type2 ? item.type2 : '',
              type3: item.type3 ? item.type3 : ''
            })
          }
        })
        this.task.unit.forEach(item => {
          user.push({id: item.person})
        })
        organiza.push({id: this.$profile.organiza.id, businessOrg: this.$profile.organiza.businessOrg, sysUsers: user})
          let taskObj = await this.taskObject.map(item => {
              return item.taskObject
          })
        let obj = {
          name: this.task.name,
          taskObject: taskObj.join(','),
          taskTypeFlows: taskTypeFlows,
          object1: this.task.object1,
          object2: this.task.object2,
          object3: this.task.object3,
          summary: this.task.summary,
          grade: this.task.grade,
          location: this.task.location,
          defectItem: JSON.stringify(this.childlist),
          defectCount: this.task.defectCount * 1,
          rectifyCount: this.task.rectifyCount * 1,
          retentionCount: this.task.retentionCount * 1,
          implementation: this.task.implementation,
          othercases: this.task.othercases,
          finalResult: JSON.stringify(this.punishment),
          organizas: organiza,
          taskSource: 2,
          urlFile: this.task.url.length ? this.task.url.join(',') : '',
          remark: this.task.remark
        }
        let loading
          // return false
        this.$confirm('提交后，任务信息不可编辑, 您确认上传任务资料吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
            loading = this.$loading({
                lock: true,
                text: 'Loading',
                spinner: 'el-icon-loading',
                background: 'rgba(0, 0, 0, 0.7)'
            })
          taskService.create(obj).then(res => {

            if (res) {
              // this.$emit("close")
              this.$message({
                type: 'success',
                message: '创建成功'
              })
                this.closetaskup()
            }
              loading.close();
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消上传'
          })
            loading.close();
        })
      },
      // 临时情况上传
      submitTing() {
        if (!this.form.distribute) {
          this.$alert('请选择上报单位')
          return false
        }
        if (!this.form.grade) {
          this.$alert('请选择任等级')
          return false
        }
        if (!this.form.summary.trim()) {
          this.$alert('请填写任务概要')
          return false
        }
          const loading = this.$loading({
              lock: true,
              text: 'Loading',
              spinner: 'el-icon-loading',
              background: 'rgba(0, 0, 0, 0.7)'
          })
        let org = {
          id: '',
          businessOrg: ''
        }
        if (this.form.enforcementBrigade) {
          org.id = this.form.enforcementBrigade
          this.organizaAll.forEach(ele => {
            if (this.form.enforcementBrigade == ele.id) {
              org.businessOrg = ele.businessOrg
            }
          })
        } else if (this.form.distribute) {
          org.id = this.form.distribute
          this.organizaAll.forEach(ele => {
            if (this.form.distribute == ele.id) {
              org.businessOrg = ele.businessOrg
            }
          })
        }
        let obj = {
          organiza: org,
          grade: this.form.grade,
          location: this.form.location,
          summary: this.form.summary,
          otherCases: this.form.otherCases,
          remark: this.form.remark,
          taskSource: 4,
          urlFile: this.form.url.length ? this.form.url.join(',') : '',
        }
        taskService.create(obj).then(res => {

          if (res) {
            this.$message({
              type: 'success',
              message: '创建成功'
            })
            this.temporaryClose()
          }
            loading.close()
        })
      },
      closetaskup() {
        this.submitJson = {}
        this.taskForm = {}
        this.treatmentmeas = []
        this.treatmentmeas1 = []
        this.snapTask = false
        this.taskupload = false
        this.value = ''
        this.value1 = ''
        this.xzcf = false
        this.wfjf = false
        this.detail = {
          createTime: '',
          sendTime: '',
          taskObject: '',
          summary: '',
          taskNo: '',
          name: '',
          type1: '',
          type2: '',
          type3: '',
          manageUnit: '',
          object1: '',
          object2: '',
          object3: '',
          outline: '',
          special: false,
          distribute: '',
          distributeSecond: '',
          grade: '',
          location: '',
          deadline: '',
          unit: [{
            person: '',
            carrier: '',
            vehicle: '',
            tool: ''
          }],
          typeradio: false,
          typeName: '',
          // url_file: [],
          fullname: '',
          url: [],
          unitList: [{fullname: '', carName: '', toolName: '', vehicle_name: ''}],
          pf_date: '',
          task_date: '',
          endTime: '',
          taskType: [{type1: '', type2: '', type3: ''}],
          taskTypeFlows: [{type1: '', type2: '', type3: '', taskType2: [], taskType3: []}],
          urlFile: [],
          finishTime: ''
        }
        this.childlist1 = [{defectitem: '', retention: ''}]
        this.taskForm = {
              cruise: '',
              shipCount: '',
              defectCount: '',
              retentionCount: '',
              rectifyCount: '',
              implementation: '',
              remark: '',
              othercases: '',
              remarks: '',
              url: [],
              type: '',
              finalResult: {
                  measureCheck: [],
                  textarea: ''
              }
}
        this.sendUser = {
          organiza: '',
          organiza2: '',
          organizas: [],
          enforceLaw: [{
            person: '',
            carrier: '',
            vehicle: '',
            tool: '',
            lawPeople: [],
            lawShip: [],
            lawCar: [],
            lawTool: [],
          }]
        }
        this.task = {
              defectCount: '',
                  rectifyCount: '',
                  retentionCount: '',
                  othercases: '',
                  taskObject: '',
                  summary: '',
                  name: '',
                  object1: '',
                  object2: '',
                  object3: '',
                  grade: '',
                  location: '',
                  unit: [{
                  person: '',
                  carrier: '',
                  vehicle: '',
                  tool: ''
              }],
                  fullname: '',
                  url: [],
                  taskType: [{type1: '', type2: '', type3: ''}],
                  taskTypeFlows: [{type1: '', type2: '', type3: '', taskType2: [], taskType3: []}],
                  urlFile: [],
                  remark: ''
          } //任务详情
        this.punishment = {
            measureCheck: [],
            textarea: ''
        }
        this.fileList = []
        this.childlist = [{defectitem: '', retention: ''}]
        this.taskObject = [
            {taskObject: ''}
        ]
      },
      async tasksubmit(taskType) {
        let isNull = '', taskTypeFlows = []
        let busorg = null, sysUsers = [], distUnit = []
          this.sendUser.enforceLaw.forEach(element => {
              if (element.person) {
                  sysUsers.push({userId: element.person})
              }
          })
        if (this.sendUser.organiza2 && this.sendUser.enforceLaw.person) {
          // this.organizaAll.forEach(ele => {
          //   if (this.sendUser.organiza2 == ele.id) {
          //     busorg = ele.businessOrg
          //   }
          // })
          //   this.sendUser.enforceLaw.forEach(element => {
          //       if (element.person) {
          //           sysUsers.push({userId: element.person})
          //       }
          //   })
          // distUnit.push({id: this.sendUser.organiza2, businessOrg: busorg, sysUsers: sysUsers ? sysUsers : null})
        } else if (this.sendUser.organiza && this.sendUser.enforceLaw.person) {
          // this.organizaAll.forEach(ele => {
          //   if (this.sendUser.organiza == ele.id) {
          //     busorg = ele.businessOrg
          //   }
          // })
          // this.sendUser.enforceLaw.forEach(element => {
          //     if (element.person) {
          //         sysUsers.push({userId: element.person})
          //     }
          // })
          // distUnit.push({id: this.sendUser.organiza, businessOrg: busorg, sysUsers: sysUsers ? sysUsers : null})
        }
          const loading = this.$loading({
              lock: true,
              text: 'Loading',
              spinner: 'el-icon-loading',
              background: 'rgba(0, 0, 0, 0.7)'
          })
        let obj = this.submitJson
        obj.id = this.detailId
        obj.taskNo = this.taskForm.taskNo
        obj.createTime = this.createTime
        obj.defectItem = JSON.stringify(this.childlist1)
        obj.defectCount = this.taskForm.defectCount
        obj.rectifyCount = this.taskForm.rectifyCount
        obj.retentionCount = this.taskForm.retentionCount
        obj.othercases = this.taskForm.othercases
        obj.implementation = this.taskForm.implementation
        obj.finalResult = JSON.stringify(this.taskForm.finalResult)
        obj.taskSource = 2
        obj.urlFile = this.taskForm.url ? this.taskForm.url.join(',') : ''
        obj.remark = this.taskForm.remark
        obj.shipCount = this.taskForm.shipCount
        obj.cruise = this.taskForm.cruise
        obj.taskUsers = sysUsers
        let num = 9
        if (taskType == 'save') {
          num = 12
          // num = 11
        }
        taskService.update(obj, num).then(res => {
          if (res) {
            this.taskupload = false
            this.getData(0)
            if(num == 9){
                this.$message({
                    type: 'success',
                    message: '提交成功!'
                })
            }else if(num == 12){
                this.$message({
                    type: 'success',
                    message: '保存成功!'
                })
            }
          }
            loading.close()
        })
      },
      cancel() {
        this.$emit('close')
      },
      //添加执法单元行
      // addUnitRow() {
      //   this.task.unit.push({
      //     'person': '',
      //     'carrier': '',
      //     'vehicle': '',
      //     'tool': ''
      //   })
      // },
      addRow() {
        this.childlist.push({
          'defectitem': '',
          'retention': ''

        })
      },
      addtaskRow() {
        this.childlist1.push({
          'defectitem': '',
          'retention': ''
        })
      },
      addTaskTypesRow(index) {
        this.task.taskTypeFlows.push({
          type1: '',
          type2: '',
          type3: '',
          taskType2: [],
          taskType3: []
        })
      },
      typeChange(event, index) {
        this.task.taskTypeFlows[index].type2 = ''
        this.task.taskTypeFlows[index].taskType2 = []
        let type = this.taskType.find(item => {
          return item.id == event
        })
        if (type.subset) {
          this.task.taskTypeFlows[index].taskType2 = type.subset
        }
        // for (var key of this.taskType) {
        //   if (key.d_id == this.task.typeFirst) {
        //     this.typeSecondOptions = key.son
        //   }
        // }
      },
      typeChange2(event, index) {
        this.task.taskTypeFlows[index].type3 = ''
        this.task.taskTypeFlows[index].taskType3 = []
        let type = this.task.taskTypeFlows[index].taskType2.find(item => {
          return item.id == event
        })
        if (type.subset) {
          this.task.taskTypeFlows[index].taskType3 = type.subset
        }
        // for (var key of this.taskType) {
        //   if (key.d_id == this.task.typeFirst) {
        //     this.typeSecondOptions = key.son
        //   }
        // }
      },
      // objectChange () {
      //   this.task.objectOther = ''
      //   this.task.objectThree = ''
      //   this.objectInputShow = false
      //   this.shipTypeThree = []
      //   for (var key of this.objectOptions) {
      //     if (key.d_id == this.task.object && key.taskname == '其他') {
      //       this.objectInputShow = true
      //
      //     }
      //     if (key.d_id == this.task.object && key.son) {
      //       this.objectOptionSon = key.son
      //     }
      //
      //   }
      //
      // },
      getOptions() {
        //任务类型
        taskTypeService.search().then((res) => {
          this.typeFirstOptions = res.filter((item) => {
            return item.level === 1
          })
        })

        //任务对象
        // this.$axios.get(this.$config["taskObject"], {
        //   params: {
        //     skey: localStorage.getItem('auth')
        //   }
        // }).then((res) => {
        //   ;
        //   this.objectOptions = res.data.content;
        //   this.objectOptionSon = res.data.content[0].son
        // });
        taskObjectService.search().then((res) => {
          this.objectOptions = res.filter((item) => {
            return item.level === 1
          })
        })

        // //管理单位
        // this.$axios.get(this.$config["taskDistribute"], {
        //   params: {
        //     skey: localStorage.getItem('auth')
        //   }
        // }).then((res) => {
        //   ;
        //   this.manageUnitOptions = res.data.content;
        // }).then((res) => {
        //   //专项列表
        //   this.$axios.get(this.$config["specialPlans"], {
        //     params: {
        //       skey: localStorage.getItem('auth')
        //     }
        //   }).then((res) => {
        //     ;
        //
        //     this.specialArr = res.data.content;
        //
        //   });
        //
        // }).then((res) => {
        //   if (this.$route.query.type) {
        //     this.getDetails();
        //   }
        // });
      },
      getDetails() {

      },
      // changeObjectType (val) {
      //   this.shipTypeThree = []
      //   this.task.objectThree = ''
      //   for (var i of this.objectOptions[0].son) {
      //
      //     if (i.d_id == val && i.childrenList.length != 0) {
      //       this.shipTypeThree = i.childrenList
      //     }
      //   }
      // },
      getUnitPeople(val) {
        /*            this.$axios.get(this.$config["disUser"], {
         params: {
         skey: localStorage.getItem('auth'),
         dId: val
         }
         }).then((res)=> {
         ;
         this.personOptions = res.data.content;
         })*/
      },
      beforeupload(file) {
        var tpye = file.name.slice(file.name.lastIndexOf('.') + 1)
        if (tpye == 'jpeg' || tpye == 'jpg' || tpye == 'png') {
          this.uploadobj.mimeType = 'image/jpeg'
        } else if (tpye == 'doc' || tpye == 'docx') {
          this.uploadobj.mimeType = 'application/msword'
        } else if (tpye == 'pdf') {
          this.uploadobj.mimeType = 'application/pdf'
        } else if (tpye == 'txt') {
          this.uploadobj.mimeType = 'text/plain'
        } else if (tpye == 'xlsx' || tpye == 'xls') {
          this.uploadobj.mimeType = 'application/vnd.ms-excel'
        }
        this.uploadobj.filename = file.name
        return true
      },
      handleExceed(files, fileList) {
        this.$message.warning(`当前限制选择 9 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`)
      },
      uploadSuccess(res) {
        if (this.snapTask == true) {
          this.task.url.push(res.data.link)
        } else if (this.tmpSituation == true) {
          this.form.url.push(res.data.link)
        } else if (this.taskupload == true) {
          this.taskForm.url.push(res.data.link)
        }
      },
      // uploadSuccess (res) {
      //   if (this.snapTask == true) {
      //     this.task.url.push(this.$config['imgUrl'] + res.resourceInfo.systemFileName)
      //   } else if (this.tmpSituation == true) {
      //     this.form.url.push(this.$config['imgUrl'] + res.resourceInfo.systemFileName)
      //   }
      // },
      uploadSuccess1(res) {
        this.detail.url.push(this.$config['imgUrl'] + res.resourceInfo.systemFileName)
      },
      uploadRemove: function (res) {
        var deleteItem = res.response.data.link
        if (this.snapTask == true) {
          for (var n = 0; n < this.task.url.length; n++) {
            if (this.task.url[n].indexOf(deleteItem) != -1) {
              this.task.url.splice(n, 1)
            }
          }
        } else if (this.tmpSituation == true) {
          for (var m = 0; m < this.form.url.length; m++) {
            if (this.form.url[m].indexOf(deleteItem) != -1) {
              this.form.url.splice(m, 1)
            }
          }
        } else if (this.taskupload == true) {
          for (var m = 0; m < this.taskForm.url.length; m++) {
            if (this.taskForm.url[m].indexOf(deleteItem) != -1) {
              this.taskForm.url.splice(m, 1)
            }
          }
        }
      },
      getDistributingTasks(val) {
        // this.$axios.get(this.$config['getDoingTask'], {
        //   params: {
        //     skey: localStorage.getItem('auth'),
        //     page: this.currentPage,
        //     counts: 10,
        //     name: this.search
        //   }
        // }).then((res) => {
        //   var data = res.data.content
        //   this.tableData1 = data.ships
        //   this.pageNumber = data.shipSize
        //   // this.currentPage = val || 1
        // })
      },
      getDistributedTasks(val) {

        this.$axios.get(this.$config['getFinishTask'], {
          params: {
            skey: localStorage.getItem('auth'),
            page: this.currentPage1,
            counts: 10,
            name: this.search
          }
        }).then((res) => {
          var data = res.data.content
          this.tableData2 = data.ships
          this.pageNumber1 = data.shipSize
          // this.currentPage1 = val || 1
        })
      },
      getAcceptedTask() {
        // this.$axios.get(this.$config['getAcceptedTask'], {
        //   params: {
        //     skey: localStorage.getItem('auth'),
        //     page: this.currentPage3,
        //     counts: 10,
        //
        //   }
        // }).then((res) => {
        //   this.tableData3 = res.data.content.ships
        //
        //   this.pageNumber3 = res.data.content.shipSize
        //   if (res.data.content.shipSize == 0) {
        //     this.newmsg = false
        //     localStorage.removeItem('newmsg')
        //   }
        // })
      },
      close1() {
        this.onekeydialog = false
        // this.$router.go(-1)
        this.$router.push('/everyday-task')
      },
      update1() {
        this.getDistributingTasks()
        this.onekeydialog = false
      },
      close() {
        this.onekeydialog = false
        this.search1()
      },
      search1() {
        this.$set(this, 'currentPage', 1)
        this.$set(this, 'currentPage1', 1)
        let query = `name.contains=` + this.search
        this.getData(0, query)
      },
      clear() {
        this.search1()
      },
      //执行中提交
      handleSubmit(data) {
        this.taskupload = true
        // this.taskid = row.d_id
        this.readread = false
        this.taskTit = '任务上传'
        this.rTask = true
        this.taskRow = false
        this.readOnly = false

        // this.punishment.length = 0
        this.showSend(data)
        this.handlerOrg()
      },
      //  处理提交时的派发select
      handlerOrg () {
          let tree = []
          for (let item of this.organization) {
              if (this.$profile.organiza.businessOrg == 5 || (this.$profile.organiza.businessOrg == 0 && this.$profile.organiza.parendId == null)) {
                  if (item.businessOrg == 3 || item.businessOrg == 4 || item.businessOrg == 1) {

                  }
              } else if (this.$profile.organiza.businessOrg == 3) {
                  if (this.$profile.organiza.id == item.id) {

                  }
              } else if (this.$profile.olevel == 2) {
                  if (this.$profile.organiza.parentId == item.id) {

                  }
              }

          }

      },
      async showSend(data) {
        this.submitJson = data
          const loading = this.$loading({
              lock: true,
              text: 'Loading',
              spinner: 'el-icon-loading',
              background: 'rgba(0, 0, 0, 0.7)'
          })
        for (let key in data) {
          if (key == 'id') {
            this.detailId = data[key]
          } else if (key == 'createTime' && data[key]) {
            this.createTime = data[key]
            this.detail.createTime = this.$m(data[key]).format('YYYY-MM-DD HH:mm:ss')
          } else if (key == 'finishTime' && data[key]) {
            this.detail.finishTime = this.$m(data[key]).format('YYYY-MM-DD HH:mm:ss')
          } else if (key == 'sendTime' && data[key]) {
            this.detail.sendTime = this.$m(data[key]).format('YYYY-MM-DD HH:mm:ss')
          } else if (key == 'createUserName' && data[key]) {
            this.detail.fullname = data[key]
          } else if (key == 'taskUsers' && data[key]) {
            data.taskUsers.forEach((item, index) => {
              if (index > 0) {
                this.sendUser.enforceLaw.push({
                    person: '',
                    carrier: '',
                    vehicle: '',
                    tool: '',
                    lawPeople: [],
                    lawShip: [],
                    lawCar: [],
                    lawTool: [],
                })
                this.detail.unitList.push({fullname: '', carName: '', toolName: '', vehicle_name: ''})
                // this.dheight += 35
                this.unitPeople.push({'person': '', 'carrier': '', 'vehicle': '', 'tool': ''})
              }
              if (data['organiza']) {
                  this.sendUser.enforceLaw[index].lawPeople = this.sysUser.filter(ele => {
                      if (ele.organiza && ele.organiza.id == data['organiza'].id) {
                          return ele.organiza.id == data['organiza'].id
                      }
                  }).sort((a, b) => {
                      if (a.level < b.level) {
                          return 1
                      } else {
                          return -1
                      }
                      return 0
                  })
                  this.sendUser.enforceLaw[index].person = item.userId
              }
              let user = this.sysUser.find(fil => {
                return fil.id == item.userId
              })
              if (user) {
                this.detail.unitList[index].fullname = user.fullname
                this.unitPeople[index].person = user.fullname
              }
            })
          } else if (key == 'defectItem' && data[key]) {
              this.childlist1 = JSON.parse(data[key])
          } else if (key == 'taskTypeFlows' && data[key]) {
            let arr = await data[key].map(item => {
              return {type1: item.type1, type2: item.type2, type3: item.type3}
            })
            let task = []
            await arr.forEach((item, index) => {
              if (index != 0) {
                this.detail.taskTypeFlows.push({type1: '', type2: '', type3: '', taskType2: [], taskType3: []})
              }
              if (item.type1) {
                let obj1 = this.taskType.find(fin => {
                  return fin.id == item.type1
                })
                if (obj1) this.detail.taskTypeFlows[index].type1 = obj1.name
                if (obj1 && obj1.subset) {
                  this.detail.taskTypeFlows[index].taskType2 = obj1.subset
                  let obj2 = obj1.subset.find(fin => {
                    return fin.id == item.type2
                  })
                  if (item.type2 && obj2) this.detail.taskTypeFlows[index].type2 = obj2.name
                  if (obj2 && obj2.subset) {
                    this.detail.taskTypeFlows[index].taskType3 = obj2.subset
                    let obj3 = obj2.subset.find(fin => {
                      return fin.id == item.type3
                    })
                    if (obj3 && item.type3) {
                      this.detail.taskTypeFlows[index].type3 = obj3.name
                    }
                  }
                }
              }
            })
          } else if (key == 'organiza' && data[key]) {
            this.detail.organiza = data[key].name
            this.organization.forEach(item => {
                if (data[key].level == 1 || data[key].level == 0) {
                    this.sendUser.organiza = data[key].id
                } else {
                    if (item.id == data[key].parentId) {
                        this.sendUser.organizas = item.sub
                        this.sendUser.organiza = item.id
                    }
                    this.sendUser.organiza2 = data[key].id
                }
            })
          } else if (key == 'urlFile' && data[key]) {
            // this.fileImg = data[key].split(',')
            this.taskForm.url = data[key].split(',')
              let urlList = data[key].split(',').map(item => {
                  let obj = {
                      name: item.substring(item.indexOf('task/') + 5),
                      url: item
                  }
                  return obj
              })
              this.fileList = urlList
              this.fileImg = urlList
              // this.detail.inspectionOpinion = data[key]
          } else if (key == 'taskObject' && data[key]) {
            this.taskObject2 = data[key].split(',').map(item => {
              return {taskObject: item}
            })
          } else if ((key == 'object1' || key == 'object2' || key == 'object3') && data[key]) {
            let obj, obj2, obj3
            obj = this.taskObjectType.find(item => {
              return item.id == data.object1
            })
            this.detail.object1 = obj.taskname
            if (obj && obj.subset && key == 'object2') {
              obj2 = obj.subset.find(item => {
                return item.id == data.object2
              })
              this.detail.object2 = obj2.taskname
              if (obj2 && obj2.subset && key == 'object3') {
                obj3 = obj2.subset.find(item => {
                  return item.id == data.object3
                })
                this.detail.object3 = obj3.taskname
              }
            }
          } else if (key == 'assignFullname' && data[key]) {
            this.detail.commitName = data[key]
          } else if (key == 'special' && data[key]) {
            if (data[key]) {
              this.detail.special = true
            } else {
              this.detail.special = false
            }
            let arr = data[key].split(',')
            arr.forEach(async item => {
              let obj = await this.plans.find(fin => {
                return fin.id == item
              })

              this.specialItem.push(obj.name)
            })

          } else if (key == 'finalResult' && data[key]) {
            let list = JSON.parse(data[key])
            if (list) {
              this.punishment = list
              this.taskForm[key] = list
            }
          } else if (key == 'grade' && data[key]) {
            this.detail.grade = data[key] == 1 ? '一般' : '紧急'
          } else if (key == 'questionFlag' && data[key]) {
            this.detail.questionFlag = data[key] ? 1 : 2
          } else if (key == 'superviseResult' && data[key]) {
            this.detail.inspectionOpinion = data[key]
          }else if (data[key]) {
            this.detail[key] = data[key]
            this.taskForm[key] = data[key]
          }
        }
          loading.close()
      },
      check(data) {
        // this.checkId = row.type_second
        this.getInspection()
        this.checkShow = true
      },
      dispose(data) {

        // this.checkId = row.type_second
        this.getInspection()
        this.disposeShow = true
      },
      getInspection(id) {
        this.checkContent = '暂无内容' // res.data.content[0].content ? res.data.content[0].content :
        this.desposeContent = '暂无内容' // res.data.content[0].requirements ? res.data.content[0].requirements :
      },
      lastLog() {
        this.order -= 1
        if (this.order < 0) {
          this.$alert('没有上一篇了')
          this.order += 1
          return
        } else {
          this.getLNSum('last')
        }
      },
      nextLog() {
        this.order += 1
        this.getLNSum('next')
      },
      getLNSum(type) {
        var that = this
        let query = `name=like=` + this.search
        let str = 'taskState=in=8' + `;${query}`
        taskService.ps(this.order, str, 1).then(res => {
          if (res && res.data.length == 0) {
            this.$alert('没有下一篇了')
            if (type == 'next') {
              this.order -= 1
            } else {
              this.order += 1
            }
          } else {
            this.showSend(res.data[0])
          }
        })
      },
    }
  }
</script>

<style lang="scss">
  .refine_zfdddaytask {
    .plansearch .el-input-group__append {
      text-align: center;
    }

    .create {
      position: relative;
    }

    .create i {
      background: red;
      width: 8px;
      height: 8px;
      position: absolute;
      top: -3px;
      right: -3px;
      display: block;
      border-radius: 50%
    }

    .el-badge__content.is-fixed.is-dot {
      right: 15px;
      left: auto;
      top: 0;
    }

    .plansearch .el-input__suffix {
      margin-right: 20px;
    }
  }

  .task-content {
    .contant {
      padding-bottom: 100px;
    }

    .punish-div .el-col-6 {
      margin-bottom: 10px;
      box-sizing: border-box;
      height: 40px;
    }

    .type-wrap {
      .w98 {
        width: 98%;
        margin: 0 2%;
      }
    }

    .annex-width > .annex-div > img {
      width: 62px;
      height: 64px;
      border-radius: 2px;
      float: left;
      margin-right: 10px;
      cursor: pointer;
      position: absolute;
      margin-bottom: 20px;
    }

    .mask {
      position: absolute;
      width: 62px;
      height: 64px;
      background-color: #000 !important;
      opacity: 0.3;
      padding-left: 0 !important;
      top: 0;
      left: 0;
      border: 0px !important;
    }

    .annex-width {
      padding: 0 !important;
      background-color: transparent !important;
      border: 0px !important;
    }

    .annex-div {
      margin-right: 10px;
      width: 62px;
      height: 64px;
      display: block;
      float: left;
      position: relative;
    }

    .file-div {
      width: auto;
      height: auto;
      padding: 0px;
      /*color: #333;*/
      margin-left: 0px;
      margin-right: 10px;

    }

    .annext-modal {
      width: 62px;
      height: 64px;
      position: absolute;
      padding-left: 0 !important;
      text-align: center;
      background-color: transparent !important;
      text-align: center;
      line-height: 64px;
    }

    .annext-modal img {
      position: absolute;
      margin-right: 0;
      background-color: transparent;
      width: auto;
      height: auto;
      vertical-align: middle;
      border: none;
      top: 50%;
      margin-top: -11px;
      width: 23px;
      height: 21px;
      margin-left: -10px;
    }

    .unit-wrap:last-child {
      margin-bottom: 0px;
    }

    .unit-wrap {
      margin-bottom: 10px;

      .w33 {
        width: 22.3%;
        float: left;
        margin: 0 1%;
      }

      .w33:first-child {
        margin-left: 0;
      }

      i {
        float: left;
        line-height: 40px;
        font-size: 20px;
        cursor: pointer;
      }

      .select-width-220 {
        float: left;
      }

    }

    .blue-button {
      width: 126px;
      margin-left: 20px;
    }

    .el-upload__tip {
      width: 300px;
      height: 40px;
      border-radius: 2px;
      border: solid 1px #dddddd;
      float: left;
      margin-top: 0;
      padding: 0 15px;
      font-size: 14px;
      color: #b9b9b9;
      text-align: left;
      box-sizing: border-box
    }

    .el-upload--text {
      float: right;
      width: 58px;
      height: 40px;
      border: none;
      border-radius: 2px;
      margin-left: 5px;
    }

    .el-upload--text button {
      background-color: #0062cd;
      border-radius: 2px;
      border: none;
      padding: 0;
      width: 58px;
      height: 40px;
      text-align: center;
      margin-left: 0px !important;
    }

    .button-action {
      padding-bottom: 30px;
    }

    .punish {
      width: auto !important;
      margin-right: 10px;
      float: left;
      margin-bottom: 10px;
    }

    .special-cont .el-checkbox-group {
      font-size: 0;
      box-sizing: border-box;
      height: 150px;
      overflow-y: scroll;
      border: 1px solid #ccc;
      padding: 0px 20px;
      width: 480px;

      label {

        margin-left: 0;
        float: left;
        height: 30px;
        margin-right: 30px;
        min-width: 40%;

      }

    }
  }

  .checkContent {
    .contant {
      padding-bottom: 20px;
    }
  }

  .refine_receiveInfo {
    .contant {
      padding: 0px 30px 30px;
    }


  }

  /*.task-content .unit-wrap .w33 {*/
  /*  width: 25%;*/
  /*}*/

  .task-detail {
    width: 100%;
    text-align: center;
    display: inline-block;


    ul {
      width: 960px;
      margin: 20px auto;
      border: 1px solid #ccc;
      border-bottom: 0px;
      display: inline-block;
      box-sizing: border-box;

      li {
        float: left;
        box-sizing: border-box;

      }

      .taskLabel {
        width: 129px;
        border-right: 1px solid #ccc;
        height: 34px;
        line-height: 34px;
        border-bottom: 1px solid #ccc;
      }

      .taskInfo {
        width: 350px;
        border-right: 1px solid #ccc;
        border-bottom: 1px solid #ccc;
        height: 34px;
        line-height: 34px;
        float: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;

      }

      .taskLong {
        width: 829px;
        border-bottom: 1px solid #ccc;
        height: 34px;
        line-height: 34px;
      }

      .noBorder {
        border-right: 0px !important;
      }

      .height68 {
        height: 68px;

        .el-checkbox__label {
          padding-left: 5px;
        }
      }

      .line-height-68 {
        line-height: 68px;
      }

      .height112 {
        height: 112px;

        .el-checkbox__label {
          padding-left: 5px;
        }
      }

      .line-height-112 {
        line-height: 112px;
      }

      .task-check {
        float: left;
        margin-left: 10px;
      }

      .task-checkbox {
        border: 0px;
        padding: 0px;
        height: auto;
        overflow: hidden;
        width: auto;

      }

      .width-400 {
        width: 479px;
        float: left;
      }

      .task-dheight {
        text-align: center;
        width: 129px;
        border-right: 1px solid #ccc;
        border-bottom: 1px solid #ccc;
      }

      .insIpt textarea {
        border: 0px;
        padding: 10px;
        box-sizing: border-box;
      }

      .task-border-bottom {
        border-bottom: 1px solid #ccc;
        width: 829px;
        min-height: 35px;

        .el-rate {
          float: left;
        }

        .imp {
          padding: 10px;
          box-sizing: border-box;
        }

        .imp-div {
          width: 100%;
          float: left;
        }

        .imp-info {
          float: left;
          line-height: 1.3;
          margin-left: 15px;
        }

        .imp-name {
          width: 100%;
          text-align: right;
        }

        .imp-input {
          padding: 10px;
          box-sizing: border-box;

          textarea {
            padding: 10px;
            box-sizing: border-box;
          }
        }
      }

      .annex-width > .annex-div > img {
        width: 62px;
        height: 64px;
        border-radius: 2px;
        float: left;
        margin-right: 10px;
        cursor: pointer;
        position: absolute;
        margin-bottom: 20px;
      }

      .annex-width {
        padding: 0 !important;
        background-color: transparent !important;
        border: 0px !important;
      }

      .annex-div {
        margin-right: 10px;
        width: 62px;
        height: 64px;
        display: block;
        float: left;
        position: relative;
      }

      .file-div {
        width: auto;
        height: auto;
        padding: 0px;
        /*color: #333;*/
        margin-left: 0px;
        margin-right: 10px;

      }


      .task-height {
        width: 100%;

        .task-width-200 {
          width: 205px;
          border-right: 1px solid #ccc;
          float: left;
          height: 34px;
          line-height: 34px;
          border-bottom: 1px solid #ccc;
        }
      }

      .task-height:last-child {
        .task-width-200 {
          border-bottom: 0px;
        }
      }

      .task-defectitem ul {
        margin: 0px;
        border: 0px;
        display: block;
      }

      .task-width-100 {
        width: 221px;
      }

      .task-select-width {
        height: 34px;
        width: auto;
        border: 0px;

        input {
          border: 0px;
          padding-right: 0px;
          padding: 0;
          height: 34px;
          line-height: 34px;
          width: auto;
          text-align: center;
        }

        .el-input__suffix {
          display: none;
        }

      }

    }
  }

</style>
